#pragma once
class CListMsg;
class CBuffer;
class GSocket
{
public:
	GSocket(void);
	void Stop();
	bool InitSock(const char* ip, unsigned short port);
	bool ConnectServer();
	bool IsConnectiong();
	static DWORD RecvThread(LPVOID lp);
	DWORD	SendMsg(LPVOID lp, DWORD dwSize);

public:
	bool	m_bRun;
	SOCKET	m_Sock;	
	SOCKADDR_IN m_ServerAddr;
	bool	m_bConnecting;
	CListMsg* m_pDBMsgList;
	CBuffer* m_pBuffer;
	HANDLE	m_hRecvHandle;
};
extern GSocket sGSocket;
